package com.gzc.pm.util
{
	import com.gzc.pm.bean.CPLRouteBean;
	
	import mx.collections.ArrayCollection;

	[Bindable]
	public class GlobalData
	{
		public function GlobalData(singletoner:Singletoner)
		{
			if(!singletoner){
				throw new Error('Please use Resource.getInstance() to get instance!');
			}
		}
		
		private static var _instance:GlobalData;
		
		public static function getInstance():GlobalData{
			if(!_instance){
				_instance = new GlobalData(new Singletoner());
				
				_instance.treeRoot = new CPLRouteBean();
				_instance.treeRoot.id = 0;
				_instance.treeRoot.name = '工艺路线';
				_instance.treeRoot.parent = null;
			}
			return _instance;
		}
		
		public var axles:ArrayCollection;
		
		public var treeRoot:CPLRouteBean;
		
	}
}
internal class Singletoner{}